#
# @author Wójcik Karol <wojcikk@student.agh.edu.pl>
# @licence http://www.gnu.org/copyleft/gpl.html GNU/GPL
#

class ErrorController < ApplicationController
layout 'standard'
before_filter :login_required

  def info
  end
  
  def account
  	@codes = params[:code]
    @users = User.find(:all, :conditions => ["mark_id = ?", params[:id]])
  end
  def study_type
	  @codes = params[:code]
    @majors = Major.find(:all, :conditions => ["study_type_id = ?", params[:id]])
  end
  def major
    @codes = params[:code]
    @subjects = Subject.find(:all, :conditions => ["major_id = ?", params[:id]])
  end
  def class_type
    @codes = params[:code]
    @lessons = Lesson.find(:all, :conditions => ["class_type_id = ?", params[:id]])
  end
  def subject
    @codes = params[:code]
    @lessons = Lesson.find(:all, :conditions => ["subject_id = ?", params[:id]])    
  end

end
